NAME=asm-led
CROSS_COMPILE = arm-linux-gnueabihf-

CC = $(CROSS_COMPILE)gcc

LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump

all:
	
	$(CC) -O0 -g -c $(NAME).S -o $(NAME).o
	
	$(LD) -Ttext=0xC0008000 $(NAME).o -o $(NAME).elf 
	
	$(OBJCOPY) -O binary $(NAME).elf  $(NAME).bin

	$(OBJDUMP) -D $(NAME).elf > $(NAME).dis
clean:
	rm -rf *.elf *.bin *.o *.dis

install:
	
	sudo cp $(NAME).bin  /mnt/hgfs/T1/


